#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;


int main(int argc, const char *argv[])
{
	Mat src=imread("/home/chh001/img/1.jpg");
	if(src.empty())
	{
		cout<<"load img error"<<endl;
	}
	imshow("input",src);
	Mat dst=Mat::zeros(src.size(),src.type());
	cvtColor(src,dst,CV_BGR2GRAY);
	equalizeHist(dst,dst);
	imshow("直方图均衡化",dst);
	waitKey(0);
	return 0;
}
